#pragma once
#include"Common.hpp"

//最大卫星数
#define satMaxCount 50

/// <summary>
/// 空间坐标结构
/// </summary>
struct SpatialCoord
{
    double x;
    double y;
    double z;
};

/// <summary>
/// 卫星位置结构
/// </summary>
struct SatPosition
{
    std::string  satId;
    SpatialCoord spatialCoords{};
};

/// <summary>
/// 卫星系统
/// </summary>
enum class SatSystem
{
    Unknown,
    GPS,
    Galileo,
    Glonass,
    BeiDou
};

/// <summary>
/// 加载星历文件
/// </summary>
/// <param name="satFileName">星历文件</param>
/// <param name="satSpatialCoords">卫星坐标</param>
/// <param name="satCount">卫星坐标数</param>
void loadSatFile(const char*satFileName,SpatialCoord *&satSpatialCoords,int &satCount);


/// <summary>
/// 解析SP3文件
/// </summary>
/// <param name="satFileName">SP3文件</param>
/// <param name="outFilePath">输出文件路径</param>
/// <param name="satSystem">卫星系统</param>
/// <param name="timeStep">时间间隔</param>
void parseSp3File(const char* satFileName, const char*outFilePath, const char* satSystem, double timeStep=0);